﻿@model ICollection<SimpleScrum.Models.ExternalLogin>

@if (Model.Count > 0)
{
    <h4>Registered OAuth logins</h4>
    <table class="table table-condensed">
        <tbody>
        @foreach (SimpleScrum.Models.ExternalLogin externalLogin in Model)
        {
            <tr>
                <td>
                    <span class="nameSocial">@externalLogin.ProviderDisplayName</span>
                </td>
                <td>
                    <span class="nameSocial">
                        @if (ViewBag.ShowRemoveButton)
                        {
                            using (Html.BeginForm("Disassociate", "Account"))
                            {
                                @Html.AntiForgeryToken()
                                @Html.Hidden("provider", externalLogin.Provider)
                                @Html.Hidden("providerUserId", externalLogin.ProviderUserId)
                                <input class="btn-danger" type="submit" value="Remove" title="Remove this @externalLogin.ProviderDisplayName credential from your account" />
                            
                            }
                        }
                        else
                        {
                            @: &nbsp;
                        }
                    </span>
                </td>
            </tr>
        }
        </tbody>
    </table>
}
